﻿/// <reference path="../jquery/jquery-1.3.2-vsdoc.js" />
/// <reference path="Complaint.Namespaces.js" />
/// <reference path="Complaint.Common.js" />

$(function() {
    var initialRating = $("input#SatisfactionLevel").val();
    $('#satisfaction')
            .ratings({ stars: 5, initialRating: initialRating })
            .bind('ratingchanged', function(event, data) {
                $("input#SatisfactionLevel").val(data.rating);
                $('#satisfaction-literal').text(Complaint.Common.SatisfactionLevel[data.rating - 1]);
            });
    $("form:first").validate();
});